package com.gkt.ec.cms.activity.dao;

import com.gkt.ec.commons.persistence.entity.user.Organization;
import com.gkt.ec.commons.shared.persistence.annotation.MyBatisDao;

import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Jin Benli
 * @version 1.0.0
 * @date 1/19/16
 */
@MyBatisDao
public interface OrganizationDao {

    @Select("select organizationId,parentOrganizationId,companyId,treePath,name from Organization_ order by treePath asc")
    List<Organization> queryAll();

    @Select("select name from Organization_ where organizationId= #{organizationId}")
    String getNameById(Long organizationId);

}
